package com.guigu.health.utils;

import javax.servlet.http.HttpServletRequest;

/**
 * @ClassName:ShiroUtils
 * @Description:
 * @Author:longtao
 * @Date:2021/4/11
 * @Version:1.0
 */
public class ShiroUtils {
    public static boolean isAjaxRequest(HttpServletRequest request) {
        String requestedWith = request.getHeader("accept");
        if (requestedWith != null && requestedWith.contains("application/json")) {
            return true;
        } else {
            return false;
        }
    }
}
